package com.chexiehui.jc.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 4s店信息
 */
public class ShopInfo implements Serializable {
     private String Id;
     private String Name;
     private String Adress;
     private BigDecimal Distance;
     private String BrandName;
     private String OtherBrand;
     private String CarId;
     private String City;
     private String StoreIntroduce;
     private String Tel;

     private String ShopId;
     private String ShopImage;

     private double Lon;
     private double Lat;

    private List<String> Imgs;

    public double getLon() {
        return Lon;
    }

    public void setLon(double lon) {
        Lon = lon;
    }

    public double getLat() {
        return Lat;
    }

    public void setLat(double lat) {
        Lat = lat;
    }

    public String getId() {
        return Id == null ? "" : Id;
    }

    public void setId(String id) {
        Id = id;
    }

    public String getName() {
        return Name == null ? "" : Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public String getAdress() {
        return Adress == null ? "" : Adress;
    }

    public void setAdress(String adress) {
        Adress = adress;
    }

    public BigDecimal getDistance() {
        return Distance == null ? Distance = BigDecimal.ZERO : Distance;
    }

    public void setDistance(BigDecimal distance) {
        Distance = distance;
    }

    public String getBrandName() {
        return BrandName == null ? "" : BrandName;
    }

    public void setBrandName(String brandName) {
        BrandName = brandName;
    }

    public String getCarId() {
        return CarId == null ? "" : CarId;
    }

    public void setCarId(String carId) {
        CarId = carId;
    }

    public String getCity() {
        return City == null ? "" : City;
    }

    public void setCity(String city) {
        City = city;
    }

    public String getDistanceStr() {
        return getDistance().compareTo(BigDecimal.valueOf(500d)) >= 0 ?
                getDistance()
                        .divide(BigDecimal.valueOf(1000), 1, BigDecimal.ROUND_HALF_UP)
                        .doubleValue() + "km" :
                getDistance().intValue() + "m";
    }

    public String getTel() {
        return Tel;
    }

    public void setTel(String tel) {
        Tel = tel;
    }

    public List<String> getImgs() {
        return Imgs == null ? Imgs = new ArrayList<>() : Imgs;
    }

    public void setImgs(List<String> Imgs) {
        this.Imgs = Imgs;
    }

    public String getShopId() {
        return ShopId == null ? "" : ShopId;
    }

    public void setShopId(String shopId) {
        ShopId = shopId;
    }

    public String getShopImage() {
        return ShopImage == null ? "" : ShopImage;
    }

    public void setShopImage(String shopImage) {
        ShopImage = shopImage;
    }

    public String getStoreIntroduce() {
        return StoreIntroduce == null ? "" : StoreIntroduce;
    }

    public void setStoreIntroduce(String storeIntroduce) {
        StoreIntroduce = storeIntroduce;
    }

    public String getOtherBrand() {
        return OtherBrand == null ? "" : OtherBrand;
    }

    public void setOtherBrand(String otherBrand) {
        OtherBrand = otherBrand;
    }
}
